<template>
	<view class="content">
		<view class="info-box">
			<!-- <view class="head">基本信息</view> -->
			<view class="item column">
				<text class="label">合同编号</text>
				<text class="text">{{item.code}}</text>
			</view>
			<view class="item column">
				<text class="label">合同名称</text>
				<text class="text">{{item.name}}</text>
			</view>
			<view class="item column">
				<text class="label">合同类型</text>
				<text class="text">
					{{utils.getDictLabelName("contractType",item.types)}}
				</text>
			</view>
			<view class="item column">
				<text class="label">负责人</text>
				<text class="text">{{user.nickName}}</text>
			</view>
			 <view class="item column">
				<text class="label">客户签约人</text>
				<text class="text">{{contacts.name}}</text>
			 </view>
			<view class="item column">
				<text class="label">客户名称</text>
				<text class="text">{{customer.customerName}}</text>
			</view>
			<view class="item column">
				<text class="label">合同金额</text>
				<text class="text">{{item.money}}</text>
			</view>
			<view class="item column">
				<text class="label">下单时间</text>
				<text class="text">{{item.orderDate}}</text>
			</view>
			<view class="item column">
				<text class="label">合同开始时间</text>
				<text class="text">{{item.startTime}}</text>
			</view>
			<view class="item column">
				<text class="label">合同结束时间</text>
				<text class="text">{{item.limitTime}}</text>
			</view>
			<view class="item column">
				<text class="label">审核人</text>
				<text class="text">
					{{auditUser.nickName}}
				</text>
			</view>
			<view class="item column">
				<text class="label">审核状态</text>
				<text class="text">
					{{utils.getDictLabelName("contractStatus",item.checkStatus)}}
				</text>
			</view>
			<view class="item column">
				<text class="label">审核意见</text>
				<text class="text">{{item.auditNote}}</text>
			</view>
			
			
			<view class="item column">
				<text class="label">备注</text>
				<text class="text">{{item.remark}}</text>
			</view>
		</view>
		<!-- <view class="info-box">
			<view class="head">系统信息</view>
			<view class="item">
				<text class="label">创建人</text>
				<text class="text">admin</text>
			</view>
			<view class="item">
				<text class="label">创建时间</text>
				<text class="text">2021-03-14 18:45:54</text>
			</view>
			<view class="item">
				<text class="label">更新时间</text>
				<text class="text">2021-03-14 18:45:54</text>
			</view>
			<view class="item">
				<text class="label">最后跟进时间</text>
				<text class="text">2021-03-14 18:45:54</text>
			</view>
			<view class="item">
				<text class="label">已收款</text>
				<text class="text">0</text>
			</view>
			<view class="item">
				<text class="label">未收款</text>
				<text class="text">555</text>
			</view>
		</view> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				auditUser:{},
				item:{},
				customer:{},
				user:{},
				contacts:{}
			}
		},
		onLoad() {
			// 修改顶部导航背景色
			uni.setNavigationBarColor({
				frontColor: '#ffffff',
				backgroundColor: '#39b54a',
				animation: {
					duration: 400,
					timingFunc: 'easeIn'
				}
			})
		},
		methods: {
			getContractDetails(item,customer,user,contacts,auditUser){
				this.item=item;
				this.customer=customer;
				this.user=user;
				this.contacts=contacts;
				console.log(auditUser)
				this.auditUser=auditUser;
			},
			// 拨打电话
			callPhone(tel){
				uni.makePhoneCall({
					phoneNumber: tel
				})
			},
		}
	}
</script>

<style scoped lang="scss">
	.content{
		background: #fff;
		padding-bottom: 20upx;
		.info-box{
			.head{
				height: 60upx;
				line-height: 60upx;
				font-size: 32upx;
				color: #000;
				font-weight: bold;
				position: relative;
				padding: 10upx 50upx;
				// &::after{
				// 	content: "";
				// 	width: 10upx;
				// 	height: 10upx;
				// 	border-radius: 5upx;
				// 	background: #333;
				// 	position: absolute;
				// 	top: 50%;
				// 	transform: translateY(-50%);
				// 	left: 20upx;
				// }
			}
			.item{
				height: 90upx;
				line-height: 90upx;
				padding: 0 50upx;
				border-bottom: 1px solid #f7f7f7;
				&:last-child{
					border-bottom: none;
				}
				&.column{
					height: auto;
					display: flex;
					flex-direction: column;
					.text{
						margin-bottom: 20upx;
						line-height: 1.5;
					}
				}
				.label{
					font-size: 30upx;
					color: #999;
					margin-right: 30upx;
				}
				.text{
					font-size: 32upx;
					color: #000;
					&.blue{
						color: #2172FF;
					}
				}
			}
		}
	}
</style>
